package forList;

import java.util.HashSet;

/**
 * @author hanj.cn@outlook.com
 */
public class HashMapTestB {

    public static void main(String[] args) {

        HashSet<Object> hashSet = new HashSet<>();
        for (int i = 1; i <= 12; i++) {
            hashSet.add(new A(i));
        }

        // 扩容
        hashSet.add(new A(13));

    }

}

class A {

    int i;

    @Override
    public int hashCode() {

        return 1000;
    }

    public A(int num) {

        this.i = num;
    }

}
